<template>
  <el-card class="box-card" shadow="hover" @click="goDetail">
    <div class="content">
      <div class="left">
        <div class="title">{{ hospitalInfo?.hosname }}</div>
        <div class="info">
          <div class="level">
            <svg t="1692625818048" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
                 p-id="6350" width="16" height="16">
              <path
                  d="M857.28 344.992h-264.832c12.576-44.256 18.944-83.584 18.944-118.208 0-78.56-71.808-153.792-140.544-143.808-60.608 8.8-89.536 59.904-89.536 125.536v59.296c0 76.064-58.208 140.928-132.224 148.064l-117.728-0.192A67.36 67.36 0 0 0 64 483.04V872c0 37.216 30.144 67.36 67.36 67.36h652.192a102.72 102.72 0 0 0 100.928-83.584l73.728-388.96a102.72 102.72 0 0 0-100.928-121.824zM128 872V483.04c0-1.856 1.504-3.36 3.36-3.36H208v395.68H131.36A3.36 3.36 0 0 1 128 872z m767.328-417.088l-73.728 388.96a38.72 38.72 0 0 1-38.048 31.488H272V476.864a213.312 213.312 0 0 0 173.312-209.088V208.512c0-37.568 12.064-58.912 34.72-62.176 27.04-3.936 67.36 38.336 67.36 80.48 0 37.312-9.504 84-28.864 139.712a32 32 0 0 0 30.24 42.496h308.512a38.72 38.72 0 0 1 38.048 45.888z"
                  p-id="6351" fill="#bfbfbf"></path>
            </svg>
            <span>{{hospitalInfo.param?.hostypeString}}</span>
          </div>
          <div class="time">
            <svg t="1692625774568" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
                 p-id="5238" width="16" height="16">
              <path
                  d="M512 178.1c-12.3 0-22.3 10-22.3 22.3V512c0 6.5 2.9 12.3 7.3 16.4 0.2 0.2 0.4 0.5 0.6 0.8L655 686.6c4.3 4.3 10 6.5 15.7 6.5 5.7 0 11.4-2.2 15.7-6.5 8.7-8.7 8.7-22.8 0-31.5L534.3 502.8V200.3c0-12.2-10-22.2-22.3-22.2z"
                  fill="#bfbfbf" p-id="5239"></path>
              <path
                  d="M1001.7 489.7c-12.3 0-22.3 10-22.3 22.3 0 257.8-209.7 467.5-467.5 467.5S44.5 769.8 44.5 512 254.2 44.5 512 44.5c168.9 0 325.3 91.6 408 239.2 5 8.8 15.3 13.2 25 10.6 9.8-2.6 16.6-11.4 16.6-21.5V102.4c0-12.3-10-22.3-22.3-22.3s-22.3 10-22.3 22.3V199C821 74.7 671.6 0 512 0 229.7 0 0 229.7 0 512s229.7 512 512 512 512-229.7 512-512c0-12.3-10-22.3-22.3-22.3z"
                  fill="#bfbfbf" p-id="5240"></path>
            </svg>
            <span>每天{{hospitalInfo?.bookingRule?.releaseTime}}放号</span>
          </div>
        </div>
      </div>
      <div class="right">
        <img :src="`data:image/jpeg;base64,${hospitalInfo?.logoData}`" alt="加载失败">
      </div>
    </div>

  </el-card>
</template>

<script setup lang="ts">
/*接收父组件传递的数据*/
import {useRouter} from "vue-router";
let prpos = defineProps(['hospitalInfo'])
let $router = useRouter()
const goDetail = ()=>{
  //这里以后也会携带参数到医院详情页去
  $router.push({path:'/hospital/register',query:{'hosCode':prpos.hospitalInfo.hoscode}})
}

</script>

<style scoped lang="scss">
.box-card:hover{
  cursor: pointer;
}

.content {
  display: flex;
  justify-content: space-between;
  .left {
    .title {
      font-size: 20px;
    }
    .info {
      display: flex;

      .level, .time {
        display: flex;
        align-items: center;
        margin: 20px 40px 0 0;

        span {
          margin-left: 5px;
        }
      }
    }
  }
  .right {
    img {
      width: 60px;
      height: 60px;
    }
  }

}
::v-deep(.el-card__body){
  width: 100%;
}

</style>